import config from "@/config"
import http from "@/utils/request"

export default {
	viewResourceManager: {
		url: `${config.API_URL}/core/report/queryDesigner/viewResourceManager`,
		name: "获取资源树状图",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	addBaseData: {
		url: `${config.API_URL}/core/report/queryDesigner/add`,
		name: "添加基本信息",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	getBaseData: {
		url: `${config.API_URL}/core/report/queryDesigner/getBaseData`,
		name: "获取基本信息",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	saveBaseData: {
		url: `${config.API_URL}/core/report/queryDesigner/saveBaseData`,
		name: "获取基本信息",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	updateBaseData: {
		url: `${config.API_URL}/core/report/queryDesigner/updateBaseData`,
		name: "更新基本信息",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	getReportFileContent: {
		url: `${config.API_URL}/core/report/queryDesigner/getReportFileContent`,
		name: "获取报表xml文件",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	saveReportFileContent: {
		url: `${config.API_URL}/core/report/queryDesigner/saveReportFileContent`,
		name: "保存报表xml文件",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	getComponentList: {
		url: `${config.API_URL}/core/report/designer/component/getComponentList`,
		name: "获取查询条件列表",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	componentDetail: {
		url: `${config.API_URL}/core/report/designer/component/detail`,
		name: "获取查询条件详情",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	componentAdd: {
		url: `${config.API_URL}/core/report/designer/component/add`,
		name: "初始化查询条件",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	
	updateOrder: {
		url: `${config.API_URL}/core/report/designer/component/updateOrder`,
		name: "查询条件排版",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	delete: {
		url: `${config.API_URL}/core/report/designer/component/delete`,
		name: "删除查询条件",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	update: {
		url: `${config.API_URL}/core/report/designer/component/update`,
		name: "更新查询条件",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	tableDetail: {
		url: `${config.API_URL}/core/report/designer/table/detail`,
		name: "数据集详情",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	getFieldList: {
		url: `${config.API_URL}/core/report/designer/field/getFieldList`,
		name: "字段列表详情",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	fieldDetail: {
		url: `${config.API_URL}/core/report/designer/field/detail`,
		name: "字段详情",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	tableAdd: {
		url: `${config.API_URL}/core/report/designer/table/add`,
		name: "初始化数据集",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	parseSql: {
		url: `${config.API_URL}/core/report/designer/table/parseSql`,
		name: "解析sql生成列",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	saveOrUpdate: {
		url: `${config.API_URL}/core/report/designer/table/saveOrUpdate`,
		name: "更新保存数据集",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	addField: {
		url: `${config.API_URL}/core/report/designer/field/add`,
		name: "更新字段",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	deleteField: {
		url: `${config.API_URL}/core/report/designer/field/delete`,
		name: "更新字段",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	designerField: {
		url: `${config.API_URL}/core/report/designer/field`,
		name: "更新字段顺序",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	updateField: {
		url: `${config.API_URL}/core/report/designer/field/saveOrUpdate`,
		name: "更新字段",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	getToolbars: {
		url: `${config.API_URL}/core/report/designer/toolbar/getList`,
		name: "获取操作按钮列表",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	addToolBar: {
		url: `${config.API_URL}/core/report/designer/toolbar/add`,
		name: "获取操作按钮列表",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	deleteToolbars: {
		url: `${config.API_URL}/core/report/designer/toolbar/delete`,
		name: "删除按钮",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	updateToolbarsIndex: {
		url: `${config.API_URL}/core/report/designer/toolbar/updateOrder`,
		name: "更新按钮顺序",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	detailToolBar: {
		url: `${config.API_URL}/core/report/designer/toolbar/detail`,
		name: "查看按钮详情",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	saveOrUpdateToolBar: {
		url: `${config.API_URL}/core/report/designer/toolbar/saveOrUpdate`,
		name: "查看按钮详情",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	dataSets: {
		url: `${config.API_URL}/core/report/designer/table/getList`,
		name: "数据集列表",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	deleteDataSet: {
		url: `${config.API_URL}/core/report/designer/table/delete`,
		name: "删除数据集",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	userconfigDetail: {
		url: `${config.API_URL}/core/report/userconfig/detail`,
		name: "查看用户配置",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	doRestoreDefaultSettings: {
		url: `${config.API_URL}/core/report/userconfig/doRestoreDefaultSettings`,
		name: "恢复默认设置",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	updateUserconfig: {
		url: `${config.API_URL}/core/report/userconfig/saveFieldList`,
		name: "更新用户配置",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	InitviewReport: {
		url: `${config.API_URL}/core/report/action/init`,
		name: "初始化",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	previewReport: {
		url: `${config.API_URL}/core/report/action/preview`,
		name: "初始化",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	exportToExcel: {
		url: `${config.API_URL}/core/report/action/exportToExcel`,
		name: "初始化",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	zipFile: {
		url: `${config.API_URL}/core/report/action/batchExportExcelToZipFile`,
		name: "初始化",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	mergeRowsExportExcel: {
		url: `${config.API_URL}/core/report/action/mergeRowsExportExcel`,
		name: "初始化",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	
}
